<?php 

class Template extends CI_Controller {

	public function build_template()
	{	
		//$this->output->cache(10);
		$this->load->model(array('video_model','kategori_model'));
		$data1['kategori'] = $this->kategori_model->get_list_kategori();
		$data1['daerah'] = $this->kategori_model->get_list_daerah();
		$data1['histori_video'] = $this->video_model->get_histori_video();
		$data1['login'] = $this->session->userdata('isLogin');
		$data1['user'] = $this->session->userdata('username'); 
		$data1['peran'] = $this->session->userdata('peran');
		if($this->session->flashdata('login_sukses')){
			$data1['berhasil'] = '<div class="alert alert-success"><a class="close" data-dismiss="alert">&times</a><h5> <span class="glyphicon glyphicon-thumbs-up "></span> Video anda telah berhasil diunggah. </h5> </div>';
		} else if($this->session->flashdata('login_gagal')) {
			$data1['berhasil'] = '<div class="alert alert-danger"><a class="close" data-dismiss="alert">&times</a><h5><span class="glyphicon glyphicon-warning-sign "></span> Maaf video anda gagal diunggah!</h5></div>';
		} else {
			$data1['berhasil'] = '';
		}
		return $data1;
	}
	
	
}

?>